package com.hu.controller;

import com.hu.entity.LoginUser;
import com.hu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ZhouKai
 * 2022/5/2 20:34
 */
@RestController
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("/login")
    public String tryLogin(@RequestBody LoginUser loginUser) {
        return userService.loginCheck(loginUser.getUserName(), loginUser.getPwd());
    }
}
